#ifndef LIGHT_H_
#define LIGHT_H_

#include "Color.h"

class Light
{
public:
    Light(  const Color& ambient, const Color& diffuse, 
            const Color& spec, float specularConst, bool directional, bool pointLight, 
            const Vec3& dir, const Vec3& pos, float fallOff) :
            m_ambientLight(ambient),
            m_diffuseLight(diffuse),
            m_specularLight(spec),
            m_specularConst(specularConst),
            m_isDirectional(directional),
            m_isPointLight(pointLight),
            m_direction(dir),
            m_pos(pos),
            m_falloff(fallOff)
            {
                m_direction.normalise();
            }
public:
    bool IsDirectional() const { return m_isDirectional;}
    const Vec3& GetDirection() const {return m_direction;}
    const Vec3& GetPosition() const {return m_pos;}
    float GetExponent() {return m_specularConst;}
    float GetFallOff() {return m_falloff;}
    const Color& GetSpecular() {return m_specularLight;}
    const Color& GetDiffuse() {return m_diffuseLight;}
    const Color& GetAmbient() {return m_ambientLight;}
    void SetDirection(const Vec3& dir){m_direction = dir;}
protected:
    bool m_isDirectional;
    bool m_isPointLight;
    Vec3 m_pos;
    Vec3 m_direction;
    Color m_ambientLight;
    Color m_diffuseLight;
    Color m_specularLight;
    float m_specularConst;
    float m_falloff;
};

#endif